home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / INSTALL < prev    next >
Encoding:
Text File  |  1994-03-01  |  11.2 KB  |  253 lines

  1. INSTALLING ICMAKE
  2. =================
  3.  
  4.                             Version 6.17
  5.  
  6.         ----------------------------------------------------------
  7.                         NOTE for UNIX platforms:
  8.                     ========================
  9.         
  10.         We do our best to catch ^M's in the source files. However,
  11.     sometimes they slip through the net. If a file contains ^M
  12.     characters the compiler may choke. If so, please remove the
  13.     ^M's and recompile.
  14.         ----------------------------------------------------------
  15.     
  16.  
  17.         The installation files for Icmake come as an archive, e.g.,
  18. "icmake.zip" or "icmake-6.17.tgz". These archives unpack to several
  19. directories and files.
  20.  
  21. Please note that, starting with distribution icmake-6.17.tgz, the archive
  22. unpacks to directories icmake/xxx below the current directory. So, if you
  23. unpack icmake-6.17.tgz (or later versions) in the directory
  24. /usr/local/src/icmake, a directory /usr/local/src/icmake/icmake is created,
  25. and other subdirectories below /usr/local/src/icmake/icmake.
  26.  
  27.         To unpack the archives, create an appropriate directory (e.g.,
  28. "/usr/local/src/icmake" for Unix platforms, or "c:\c\icmake" for DOS) and
  29. change-dir to that directory. Use an appropriate archiver to unpack. Some
  30. possibilities are described below:
  31.  
  32. (a) Archives in the form ".tgz" can be unpacked using
  33.         "gzip -c -d icmake-6.17.tgz | tar xvf -".
  34. If you have GNU tar version 1.11.2 or higher, you can use
  35.         "tar xvzf icmake-6.17.tgz".
  36.  
  37. (b) The archives with the extension ".zip" can be unpacked using
  38. "unzip icmake.zip" or "pkunzip -d icmake.zip".
  39.  
  40.         The extraction of files from the archive should yield a lot of C
  41. source files in a number of directories. The default distribution of Icmake
  42. does not contain makefiles for the Unix-utility "make" anymore.
  43.  
  44. For Linux-unix platforms, the icmake-executables are found in the subdirectory
  45. binlinux. For Ms-DOS platforms, the icmake-executables are found in the
  46. subdirectory bindos. Depending on what platform you use, install either, both,
  47. or none of these executables.
  48.  
  49. For other UNIX-platforms the programs can be created by compiling all files "by
  50. hand". Even here, we made it easy for you to bootstrap icmake, by providing the
  51. shellscript bootstrap. Simply say
  52.  
  53.                            'sh bootstrap'
  54.  
  55. and the full icmake compilation is performed. This will put the executables in
  56. the bin subdirectory below the icmake subdirectory created by the untarring of
  57. icmake-X.YY.tgz. Also, it will leave a lot of compiler residues behind, such
  58. as .o files. However, after 'sh bootstrap' the unix-script can be used (see
  59. below, you have to put the icmake files in /usr/local/bin or adapt the
  60. 'unix' script and 'def/destinations.im' to suit your system). After putting
  61. the icmake programs in their proper directories, say
  62.  
  63.                             'unix clean'
  64.                 
  65. to clean up the garbage.                
  66.  
  67. Finally, you can do it all by yourself. Then compile all files as indicated
  68. in the following steps:
  69.  
  70. (a) Note that even though grammar definition and lexical scanner definition
  71.     files (parser and lexer) are found at several subdirectories, the bison and
  72.     flex programs should *NOT* be used. The parser.c and lexer.c files are
  73.     already available, and you might run into name-resolution problems if you
  74.     try to create parser.c or lexer.c with the bison/flex found at your site.
  75.     The parser and lexer files were included for documentation purposes only,
  76.     don't feed them to bison or flex.
  77.  
  78. (b) With some files the (GNU-C) compiler generates warnings. These warnings
  79.     fall into two categories: 'default' entry proints in switches cause the
  80.     compiler to complain about undefined enumeration values inside the switch,
  81.     and these warnings can safely be ignored.
  82.  
  83.     Then, with the lexer.c and parser.c files the compiler may complain about
  84.     variables which were defined but not used. Again: no harm done, and you can
  85.     safely ignore these warnings as well.
  86.  
  87. (c) Change-dir to the directory "rss". This directory contains sourcefiles for
  88.     the Runtime Support System. These functions are used in all the programs of
  89.     the Icmake family.
  90.  
  91.     Compile all files, using the appropriate compiler flags which cause your
  92.     compiler to compile-only.
  93.     If your compiler supports memory models, choose the "small" model.
  94.     E.g., these compiler flags are:
  95.  
  96.     for GNU's gcc:                  gcc -c -DHAVE_GLOB
  97.     for Microsoft C 7.00:           cl -c -AS
  98.  
  99.     NOTE: The flag -DHAVE_GLOB causes the function glob() to be included in the
  100.     code, which expands a filename with wildcards to a list of names. The flag
  101.     is not needed for MSDOS compilations. If you do not have this function,
  102.     leave out the -DHAVE_GLOB specification. This is further discussed below.
  103.  
  104.     While compiling, you may need other special definition flags to produce
  105.     workable code for 'exotic' (well.. exotic to us) systems. Please check the
  106.     section below to see if you need any special flags.
  107.  
  108.     Next, place the produced object files into one library. A suggested name is
  109.     "libicrss.a" for Unix systems, or "icrss.lib" for DOS systems. See the
  110.     documentation of your library manager ("ar" or "lib") for the required
  111.     command line.
  112.  
  113.     For Unix systems try:
  114.                               ar rsv libicrss.a *.o
  115.     in the directory "rss".
  116.  
  117. (d) The following directories were also created from the archive:
  118.             make,
  119.             pp,
  120.             comp,
  121.             exec,
  122.             un.
  123.  
  124.     The directories hold respectively the files needed for the top-level
  125.     program "icmake", for the preprocessor "icm-pp", for the compiler
  126.     "icm-comp", for the executor "icm-exec" and for the unassembler "icmun".
  127.     These program names are on Unix-based systems without extension; supply
  128.     ".exe" for DOS.
  129.  
  130.     Change-dir to each of these directories, and compile and link all .c files
  131.     into the appropriate program. E.g., for a Unix system you might type:
  132.             cd make
  133.             gcc -DHAVE_GLOB -o icmake *.c ../rss/libicrss.a
  134.             cd ../pp
  135.             gcc -DHAVE_GLOB -o icm-pp *.c ../rss/libicrss.a
  136.             cd ../comp
  137.             gcc -DHAVE_GLOB -o icm-comp *.c ../rss/libicrss.a
  138.             cd ../exec
  139.             gcc -DHAVE_GLOB -o icm-exec *.c ../rss/libicrss.a
  140.             cd ../un
  141.             gcc -DHAVE_GLOB -o icmun *.c ../rss/libicrss.a
  142.             cd ..
  143.  
  144.     For a DOS platform with the Microsoft compiler, you might type:
  145.  
  146.             cd make
  147.             cl -AS -J -Feicmake.exe *.c ..\rss\icrss.lib
  148.             cd ..\pp
  149.             cl -AS -J -Feicm-pp.exe *.c ..\rss\icrss.lib
  150.             cd ..\comp
  151.             cl -AS -J -Feicm-comp.exe *.c ..\rss\icrss.lib
  152.             cd ..\exec
  153.             cl -AS -J -Feicm-exec.exe *.c ..\rss\icrss.lib
  154.             cd ..\un
  155.             cl -AS -J -Feicmun.exe *.c ..\rss\icrss.lib
  156.             cd ..
  157.  
  158.     Whichever platform you use, please name the resulting program by the
  159.     appropriate name (one of "icmake", "icm-pp", "icm-comp", "icm-exec",
  160.     "icmun", optionally followed by an extension ".exe" for DOS systems). The
  161.     reason for this is the fact that the top-level program "icmake" must be
  162.     able to call all subsequent programs, of which the names therefore must be
  163.     known. Furthermore, you may need special compilation flags for rare systems
  164.     (see the section below).
  165.  
  166. (e) If all goes well, you've now created all necessary programs. Move the
  167.     executable files to a system directory; e.g., "/usr/local/bin" for Unix
  168.     systems, "c:\sys\bin" for DOS systems, etc.
  169.  
  170. (f) For all subsequent releases of Icmake which you may wish to install, you
  171.     can use your old programs of the Icmake family and the included
  172.     icmake-files. E.g., the installation includes a file "unix" to create
  173.     Icmake for Unix platforms.
  174.  
  175.     Prior to using the unix script, you may wish to
  176.     edit the following files:
  177.  
  178.         def/programs:           to (re)define and check the programs used
  179.                                 by the unix-script,
  180.         def/destinations:       to (re)define your system directory, etc.
  181.  
  182.     Even when you successfully create Icmake by hand, it may be a good
  183.     idea to re-make it with the makefile to check its workings. Just type
  184.     "unix", or "icmake dos-msc" or whatever is appropriate; then follow
  185.     the instructions which are printed by the makefile.
  186.  
  187. Special flags while compiling
  188. -----------------------------
  189.  
  190.         This section is also found in INSTALL.
  191.  
  192.         A large part of the source code of Icmake should compile on any
  193. platform. The exceptions we have encountered so far are the following:
  194.  
  195. (a) On MSDOS platforms, the constant MSDOS must be defined. This symbol is
  196. by default defined by the Microsoft compiler. For other compilers on DOS
  197. systems, a flag "-DMSDOS" may be necessary when invoking the compilations.
  198. Non-DOS systems should, obviously, *not* have a defined symbol MSDOS.
  199.  
  200. (b) Many systems which are based on GNU software, such as the Linux
  201. operating system, have a function glob() to expand wildcards to filenames.
  202. Icmake should be compiled with the symbol HAVE_GLOB (flag -DHAVE_GLOB on the
  203. compiler command line) when this function is available.
  204.  
  205. When Icmake is compiled without this flag, wildcards are expanded using a
  206. `poor mans solution' (PMS). See the file rss/dosfind.c for further details.
  207.  
  208. Modifying Icmake: the preloaded symbols
  209. ---------------------------------------
  210.  
  211.         Icmake does not require special modifications. However, you may wish to
  212. take a look at the file pp/loadsym.c. In this file the function 'loadsym()'
  213. of the preprocessor icm-pp is found. The preloaded symbols of Icmake are 
  214. defined in this function. E.g., MSDOS is defined as 1 when an MSDOS platform 
  215. is used, linux is defined as 1 when Icmake is compiled for Linux, etc.. 
  216. If you plan to use these predefined symbols in your Icmake scripts, make sure 
  217. that the conditional code in the file pp/loadsym.c recognizes your platform.
  218.  
  219.         If you are unsure whether this code recognizes your compiler, build
  220. Icmake as distributed and try out the sample icmake file examples/defines.im
  221. (i.e., say: "icmake examples/defines"). If the output of the makefile is
  222. not satisfatory, modify pp/loadsym.c. E.g., if your MegaC compiler defines the
  223. symbol MEGA_C, you might want to add the following lines to pp/loadsym.c:
  224.  
  225.                         #ifdef MEGA_C
  226.                             preload("MEGA_C", "1");
  227.                         #else
  228.                             preload("MEGA_C", "0");
  229.                         #endif
  230.  
  231. Currently the following symbols are built in Icmake:
  232.  
  233.         --------------------------------------------------------------
  234.         symbol          1 when defined on the platform ... otherwise 0
  235.         --------------------------------------------------------------
  236.         MSDOS           MS-DOS platform (with MSC 7.00 compiler)
  237.         unix            Unix, usually with GNU's gcc compiler
  238.         linux           '386 or '486 running Linux (usually with gcc)
  239.         M_SYSV, M_UNIX  '386 or '486 running SCO/Unix (usually with
  240.                         Microsoft C)
  241.         _POSIX_SOURCE   Unix with Posix complient compiler
  242.         __hpux          HP-UX, with the native HP compiler
  243.         --------------------------------------------------------------
  244.  
  245. If you want to modify something here which hasn't been done before, please
  246. email us about it, and we'll include it in the standard distribution.
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.